home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4589 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  895 b 

  1. Path: southwind.net!usenet
  2. From: kurtg@southwind.net (Kurt Graber)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: for loop question
  5. Date: 31 Jan 1996 04:25:42 GMT
  6. Organization: SouthWind Internet Access, Inc.
  7. Message-ID: <4emr06$470@opal.southwind.net>
  8. References: <4emqf8$470@opal.southwind.net>
  9. NNTP-Posting-Host: onyx.southwind.net
  10. X-Newsreader: WinVN 0.91.6
  11.  
  12. In article <4emqf8$470@opal.southwind.net>, kurtg@southwind.net (Kurt 
  13. Graber) says:
  14. >
  15. >I am currently learning c++ so maybe you gurus can answer this
  16. >also I am using borland turbo c++ 3.0
  17. >I can't get the following code to give me any output.
  18. >
  19. >#include <iostream.h>
  20. >
  21. >void main (void)
  22. >{
  23. >   int a;
  24. >   for(a = 0;a == 10;a++)
  25. >   {
  26. >    cout << "anything";
  27. >   }
  28. >}
  29. >
  30. >///If I change the loop to     for(a=0;a<=10;a++)
  31. >   the program will work fine.   
  32. >   why?????????
  33. >    thanks 
  34. >         kurt
  35. >
  36. I know why stupid me.........KURT
  37.